<html>
<head><meta charset="utf-8"><title>chalk-integration · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html">chalk-integration</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147821927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147821927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147821927">(Nov 16 2018 at 15:04)</a>:</h4>
<p>so <span class="user-mention" data-user-id="116009">@nikomatsakis</span> the <code>TraitEngine</code> trait uses <code>ty::ParamEnv</code> and <code>ty::Predicate</code>. I'm wondering what would be the best solution to enable the use of our parallel types for chalk <code>traits::Environment</code> and <code>traits::Goal</code></p>



<a name="147841789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841789">(Nov 16 2018 at 19:55)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> hmm</p>



<a name="147841793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841793">(Nov 16 2018 at 19:55)</a>:</h4>
<p>a good question =)</p>



<a name="147841801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841801">(Nov 16 2018 at 19:55)</a>:</h4>
<p>maybe <code>TraitEngine</code> approach won't work, seeing how far we've split things</p>



<a name="147841868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841868">(Nov 16 2018 at 19:56)</a>:</h4>
<p>although almost always</p>



<a name="147841870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841870">(Nov 16 2018 at 19:56)</a>:</h4>
<p>the <code>PAramEnv</code> comes from a <code>DefId</code></p>



<a name="147841880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841880">(Nov 16 2018 at 19:56)</a>:</h4>
<p>That was my thought for the param env indeed</p>



<a name="147841885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841885">(Nov 16 2018 at 19:56)</a>:</h4>
<p>maybe we could give it an <code>Option&lt;DefId&gt;</code> or something</p>



<a name="147841899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841899">(Nov 16 2018 at 19:56)</a>:</h4>
<p>and when it is <code>None</code> we fallback to the old system for now or something, that's quite rare</p>



<a name="147841906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841906">(Nov 16 2018 at 19:56)</a>:</h4>
<p>translating a predicate to a goal seems easy</p>



<a name="147841917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841917">(Nov 16 2018 at 19:57)</a>:</h4>
<p>at least...much of the time :)</p>



<a name="147841940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841940">(Nov 16 2018 at 19:57)</a>:</h4>
<p>We even have a trait for that in <code>librustc_traits</code></p>



<a name="147841954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147841954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147841954">(Nov 16 2018 at 19:57)</a>:</h4>
<p>Not as clean as I hoped but I guess this will do for a start :)</p>



<a name="147842063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147842063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147842063">(Nov 16 2018 at 19:58)</a>:</h4>
<p>sounds like a plan</p>



<a name="147842921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147842921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147842921">(Nov 16 2018 at 20:12)</a>:</h4>
<p>Is there a list of PRs I can look at to see how we are doing this? This is interesting to me.</p>



<a name="147846603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/147846603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#147846603">(Nov 16 2018 at 21:14)</a>:</h4>
<p>hmm not sure</p>



<a name="148201754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148201754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148201754">(Nov 23 2018 at 01:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> successfully type-checked the chalk initial program (<a href="https://gist.github.com/nikomatsakis/95d11e8112bb80c9e862e0a6800a4dea" target="_blank" title="https://gist.github.com/nikomatsakis/95d11e8112bb80c9e862e0a6800a4dea">https://gist.github.com/nikomatsakis/95d11e8112bb80c9e862e0a6800a4dea</a>) with "-Z chalk"</p>



<a name="148237004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148237004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148237004">(Nov 23 2018 at 15:55)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> wooh!</p>



<a name="148237215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148237215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148237215">(Nov 23 2018 at 15:59)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> PR coming up soon? :-D</p>



<a name="148237446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148237446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148237446">(Nov 23 2018 at 16:03)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> I’m actually building my work onto one PR which has not landed yet, and another one which isn’t even up yet (because it also builds on the former) lol</p>



<a name="148237491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148237491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148237491">(Nov 23 2018 at 16:04)</a>:</h4>
<p>plus I think I’d need niko’s universes PR to get region constraints to work properly</p>



<a name="148239807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148239807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148239807">(Nov 23 2018 at 16:54)</a>:</h4>
<p>I don't even know what "universes" are, but fair enough :-)</p>



<a name="148240676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148240676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148240676">(Nov 23 2018 at 17:15)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span>  would you mind posting a link to your first integration PR here?</p>



<a name="148241227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148241227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148241227">(Nov 23 2018 at 17:28)</a>:</h4>
<p><span class="user-mention" data-user-id="128294">@blitzerr</span> sorry not sure what you meant</p>



<a name="148241230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148241230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148241230">(Nov 23 2018 at 17:28)</a>:</h4>
<p>my WIP branch can be found here: <a href="https://github.com/rust-lang/rust/compare/master...scalexm:chalk" target="_blank" title="https://github.com/rust-lang/rust/compare/master...scalexm:chalk">https://github.com/rust-lang/rust/compare/master...scalexm:chalk</a></p>



<a name="148241246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148241246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148241246">(Nov 23 2018 at 17:28)</a>:</h4>
<p>the beginning of the history is basically <a href="https://github.com/rust-lang/rust/pull/55921" target="_blank" title="https://github.com/rust-lang/rust/pull/55921">https://github.com/rust-lang/rust/pull/55921</a></p>



<a name="148241253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148241253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148241253">(Nov 23 2018 at 17:29)</a>:</h4>
<p>plus some unification things, which I'll push in a separate PR for easier reviewing</p>



<a name="148241999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148241999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148241999">(Nov 23 2018 at 17:48)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> I’m actually building my work onto one PR which has not landed yet, and another one which isn’t even up yet (because it also builds on the former) lol</p>
</blockquote>
<p>Sorry, for the confusion <span class="user-mention" data-user-id="131694">@scalexm</span> . My comment was related to the above quote of yours. I am guessing that you were referring to your WIP branch. Thanks for the link. <span class="emoji emoji-1f642" title="slight smile">:slight_smile:</span></p>



<a name="148743502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148743502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148743502">(Nov 28 2018 at 21:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> list of things that need to be fixed</p>
<ul>
<li>apparently <code>WF(ty)</code> predicates cannot error out, when they do I get a <code>bug!("* WF predicate not satisfied for ...")</code>, thoughts?</li>
<li>typeck pushes <code>Predicate::Subtype</code> obligations, which have no equivalent in<code> chalk-engine</code>; currently I'm relying on the fact that <code>fn unify_parameters</code> is only called with <code>chalk_engine::HhGoal::Unify(_, _)</code> and since we were not using this variant in rustc yet (e.g. no <code>EqGoal</code> or whatever), I'm currently using it to perform sub-typing, but really I think we want <code>chalk_engine::HhGoal::Unify(variance, _, _)</code></li>
<li>lazy normalization seems to work well in an unnormalized context, but since there are calls to <code>traits::normalize</code> a bit everywhere I cannot even test it with concrete types since the associated types values are resolved even before using the chalk engine :p there seems to be a lot of different ways to normalize associated types currently so I'm not sure which ones I should try to e.g. deactivate in the presence of <code>-Z chalk</code></li>
<li>I do not handle region constraints yet because I don't know how to deal with <code>DomainGoal::TypeOutlives</code> etc</li>
</ul>



<a name="148743589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148743589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148743589">(Nov 28 2018 at 21:07)</a>:</h4>
<p>also the whole setup of creating a <code>ChalkContext</code> etc is not very efficient for now, basically because of coherence but we may discuss that later since at least it works (I have some ideas to fix that)</p>



<a name="148749498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148749498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148749498">(Nov 28 2018 at 22:39)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> is your chalk integration work existing on a branch?</p>



<a name="148749499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148749499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148749499">(Nov 28 2018 at 22:39)</a>:</h4>
<p>is there a PR?</p>



<a name="148750257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148750257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148750257">(Nov 28 2018 at 22:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  <a href="https://github.com/rust-lang/rust/compare/master...scalexm:chalk?expand=1" target="_blank" title="https://github.com/rust-lang/rust/compare/master...scalexm:chalk?expand=1">https://github.com/rust-lang/rust/compare/master...scalexm:chalk?expand=1</a></p>



<a name="148750259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148750259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148750259">(Nov 28 2018 at 22:52)</a>:</h4>
<p>no PR yet (waiting on unification PR)</p>



<a name="148787912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148787912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148787912">(Nov 29 2018 at 13:58)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> sorry, I tried to review yesterday but wasn't up to it. Hoping to do so right now this morning</p>



<a name="148806762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806762">(Nov 29 2018 at 18:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Ok I'm basically hitting this bug where two answers to one goal have identical substitutions but different lifetime constraints, but actually these lifetime constraints should be identical, it's just the way they are treated in unification that triggers that</p>



<a name="148806797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806797">(Nov 29 2018 at 18:28)</a>:</h4>
<p>so in <code>nll_relate</code> when we see two regions e.g. <code>'?0</code> and <code>'?1</code> we just push two region constraints <code>'?0:  '?1</code> and <code>'?1: '?0</code></p>



<a name="148806876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806876">(Nov 29 2018 at 18:28)</a>:</h4>
<p>but in my case, I have two different ways to prove a goal, say <code>Implemented(T: Sized)</code></p>



<a name="148806889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806889">(Nov 29 2018 at 18:29)</a>:</h4>
<p>I have in my environment: <code>FromEnv(T: Sized)</code>, <code>FromEnv(&amp;Option&lt;T&gt;)</code></p>



<a name="148806896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806896">(Nov 29 2018 at 18:29)</a>:</h4>
<p>both imply <code>Implemented(T: Sized)</code></p>



<a name="148806926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148806926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148806926">(Nov 29 2018 at 18:29)</a>:</h4>
<p>however when using <code>FromEnv(&amp;Option&lt;T&gt;)</code>, we will basically push two useless region constraints as described above</p>



<a name="148807019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148807019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148807019">(Nov 29 2018 at 18:30)</a>:</h4>
<p>and in turn the solver believes that there are two different answers</p>



<a name="148810274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148810274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148810274">(Nov 29 2018 at 19:13)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> er, just saw that</p>



<a name="148810283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148810283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148810283">(Nov 29 2018 at 19:14)</a>:</h4>
<p>but I just completed a review of your PR and I had one question <a href="https://github.com/rust-lang/rust/pull/56214#discussion_r237620493" target="_blank" title="https://github.com/rust-lang/rust/pull/56214#discussion_r237620493">here</a></p>



<a name="148810334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148810334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148810334">(Nov 29 2018 at 19:14)</a>:</h4>
<p>I've got to run now but I'll be back in ~1hr or so and try to read your comments here + respond</p>



<a name="148810343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148810343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148810343">(Nov 29 2018 at 19:14)</a>:</h4>
<p>(really have to go now though)</p>



<a name="148811172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148811172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148811172">(Nov 29 2018 at 19:22)</a>:</h4>
<blockquote>
<p>but I just completed a review of your PR and I had one question <a href="https://github.com/rust-lang/rust/pull/56214#discussion_r237620493" target="_blank" title="https://github.com/rust-lang/rust/pull/56214#discussion_r237620493">here</a></p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes that was a mistake on my part</p>



<a name="148820433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148820433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148820433">(Nov 29 2018 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> ok r+</p>



<a name="148820441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148820441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148820441">(Nov 29 2018 at 21:22)</a>:</h4>
<p>I .. actually didn't notice if you applied the other nits</p>



<a name="148820484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148820484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148820484">(Nov 29 2018 at 21:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I did :p</p>



<a name="148821780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148821780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148821780">(Nov 29 2018 at 21:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> related to bullet point number 2 in my above list, I opened <a href="https://github.com/rust-lang-nursery/chalk/pull/191" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/191">https://github.com/rust-lang-nursery/chalk/pull/191</a> in chalk</p>



<a name="148821812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148821812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148821812">(Nov 29 2018 at 21:41)</a>:</h4>
<p>(also there is <a href="https://github.com/rust-lang-nursery/chalk/pull/184" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/184">https://github.com/rust-lang-nursery/chalk/pull/184</a> which has been there for some time, I had forgotten about it)</p>



<a name="148823653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148823653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148823653">(Nov 29 2018 at 22:07)</a>:</h4>
<p>bullet points 3 and 4 can be left as follow-up items, as well as my above comments regarding region constraints: I'm basically ignoring all region constraints for now</p>



<a name="148824979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148824979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#148824979">(Nov 29 2018 at 22:29)</a>:</h4>
<p>Regarding bullet point 1, I'm adding a simple error message ("type ... not well-formed") for now in the presence of <code>-Z chalk</code></p>



<a name="152057479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057479">(Dec 17 2018 at 20:24)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> <a href="https://github.com/rust-lang/rust/pull/56384#pullrequestreview-185739514" target="_blank" title="https://github.com/rust-lang/rust/pull/56384#pullrequestreview-185739514">left a review</a> -- curious to hear your thoughts! Beautiful btw. </p>
<p>I should probably get a local build going so I can play around with it, actually.</p>



<a name="152057604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057604">(Dec 17 2018 at 20:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> so about the def-id I saw this was <span class="user-mention" data-user-id="119009">@eddyb</span> ‘s concern already with the <code>Reveal</code> field or something</p>



<a name="152057615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057615">(Dec 17 2018 at 20:25)</a>:</h4>
<p>well, Reveal is different</p>



<a name="152057628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057628">(Dec 17 2018 at 20:26)</a>:</h4>
<p>but let me look, are you referring to comments on the PR itself?</p>



<a name="152057667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057667">(Dec 17 2018 at 20:26)</a>:</h4>
<p>Yes</p>



<a name="152057680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057680">(Dec 17 2018 at 20:26)</a>:</h4>
<p>But I indeed did hit some problems with queries</p>



<a name="152057687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057687">(Dec 17 2018 at 20:26)</a>:</h4>
<p>I don't see any such comments</p>



<a name="152057695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057695">(Dec 17 2018 at 20:26)</a>:</h4>
<p>Err</p>



<a name="152057700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057700">(Dec 17 2018 at 20:26)</a>:</h4>
<p>the reason I think that the <code>reveal</code> field is different</p>



<a name="152057705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057705">(Dec 17 2018 at 20:26)</a>:</h4>
<p>Sorry I meant the comment you left</p>



<a name="152057713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057713">(Dec 17 2018 at 20:27)</a>:</h4>
<p>is that indeed the answers to queries are actually <em>different</em></p>



<a name="152057719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057719">(Dec 17 2018 at 20:27)</a>:</h4>
<p>based on whether things are revealed</p>



<a name="152057720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057720">(Dec 17 2018 at 20:27)</a>:</h4>
<p>or they could be anyway</p>



<a name="152057753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057753">(Dec 17 2018 at 20:27)</a>:</h4>
<p>probably I don’t remember</p>



<a name="152057811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057811">(Dec 17 2018 at 20:28)</a>:</h4>
<p>I just remember that eddyb hacked something in a const-related query</p>



<a name="152057844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057844">(Dec 17 2018 at 20:28)</a>:</h4>
<p><code>const_eval</code> / <code>const_eval_raw</code> etc</p>



<a name="152057860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057860">(Dec 17 2018 at 20:29)</a>:</h4>
<p>But anyway yes I agree the def-id is an issue for caching</p>



<a name="152057871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057871">(Dec 17 2018 at 20:29)</a>:</h4>
<p>I saw you were clearing the field in const-related caches</p>



<a name="152057877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057877">(Dec 17 2018 at 20:29)</a>:</h4>
<p>presumably in part for this reason?</p>



<a name="152057955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057955">(Dec 17 2018 at 20:30)</a>:</h4>
<p>Yes because otherwise the query was called twice, so it shouldn’t really be an issue <em>but</em> this query emits diagnostics :)</p>



<a name="152057979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057979">(Dec 17 2018 at 20:30)</a>:</h4>
<p>So this was to avoid duplicate errors</p>



<a name="152057996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152057996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152057996">(Dec 17 2018 at 20:30)</a>:</h4>
<p>Ah and that’s why the query was separated in two halves by eddyb I remember</p>



<a name="152058017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058017">(Dec 17 2018 at 20:30)</a>:</h4>
<p>So that it does not output the error twice when you call it with both <code>Reveal</code> values</p>



<a name="152058049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058049">(Dec 17 2018 at 20:31)</a>:</h4>
<p>About sub-typing I left some comments in a Zulip stream some time ago</p>



<a name="152058075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058075">(Dec 17 2018 at 20:31)</a>:</h4>
<p>But basically: <a href="https://github.com/rust-lang-nursery/chalk/pull/191" target="_blank" title="https://github.com/rust-lang-nursery/chalk/pull/191">https://github.com/rust-lang-nursery/chalk/pull/191</a></p>



<a name="152058131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058131">(Dec 17 2018 at 20:32)</a>:</h4>
<p>Me using <code>EqGoal</code> to perform sub-typing was just a hack to get things to work</p>



<a name="152058152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058152">(Dec 17 2018 at 20:32)</a>:</h4>
<p>Since we were not using <code>EqGoal</code> in rustc for now</p>



<a name="152058162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152058162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152058162">(Dec 17 2018 at 20:32)</a>:</h4>
<p>I was planning to rebase when the chalk PR lands</p>



<a name="152059144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152059144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152059144">(Dec 17 2018 at 20:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I gave an example of an issue with region constraints in this stream actually</p>



<a name="152059245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152059245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152059245">(Dec 17 2018 at 20:46)</a>:</h4>
<p>This message</p>



<a name="152059260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152059260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152059260">(Dec 17 2018 at 20:46)</a>:</h4>
<p>« <span class="user-mention" data-user-id="116009">@nikomatsakis</span> Ok I'm basically hitting this bug where two answers to one goal have identical substitutions but different lifetime constraints, but actually these lifetime constraints should be identical, it's just the way they are treated in unification that triggers that »</p>



<a name="152060574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152060574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152060574">(Dec 17 2018 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> ok I see you are way ahead of me</p>



<a name="152060588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152060588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152060588">(Dec 17 2018 at 21:05)</a>:</h4>
<p>shall I land that chalk PR and publish a new version then?</p>



<a name="152060591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152060591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152060591">(Dec 17 2018 at 21:05)</a>:</h4>
<p>sorry for being so behind :)</p>



<a name="152060606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152060606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152060606">(Dec 17 2018 at 21:05)</a>:</h4>
<p>Lol np</p>



<a name="152060618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152060618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152060618">(Dec 17 2018 at 21:05)</a>:</h4>
<p>Yes, I’ll rebase my PR to use that chalk PR</p>



<a name="152061758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152061758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152061758">(Dec 17 2018 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> ok I'm publishing chalk-engine 0.9.0</p>



<a name="152061771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152061771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152061771">(Dec 17 2018 at 21:22)</a>:</h4>
<p>in a minute</p>



<a name="152062898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152062898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152062898">(Dec 17 2018 at 21:38)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> done</p>



<a name="152199055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152199055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152199055">(Dec 19 2018 at 17:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I’ll update the PR tomorrow</p>



<a name="152199121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152199121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152199121">(Dec 19 2018 at 17:34)</a>:</h4>
<p>great, I was not trying to put pressure on you</p>



<a name="152199128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152199128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152199128">(Dec 19 2018 at 17:34)</a>:</h4>
<p>was just nothing for my own sanity :)</p>



<a name="152278318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152278318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152278318">(Dec 20 2018 at 18:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ping</p>



<a name="152564098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564098">(Dec 26 2018 at 18:07)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> png</p>



<a name="152564294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564294">(Dec 26 2018 at 18:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> pong</p>



<a name="152564296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564296">(Dec 26 2018 at 18:11)</a>:</h4>
<p>you rang? :)</p>



<a name="152564298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564298">(Dec 26 2018 at 18:11)</a>:</h4>
<p>I guess pertaining to your PR perhaps?</p>



<a name="152564309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564309">(Dec 26 2018 at 18:11)</a>:</h4>
<p>So I updated the code to use the new chalk version, and to set a <code>DefId</code> on <code>ParamEnv</code> only with <code>-Z chalk</code></p>



<a name="152564363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564363">(Dec 26 2018 at 18:12)</a>:</h4>
<p>So I thought maybe we should talk about the lifetime issues I encountered</p>



<a name="152564368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564368">(Dec 26 2018 at 18:12)</a>:</h4>
<p>(Lifetime issues regarding the trait solver I mean)</p>



<a name="152564684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564684">(Dec 26 2018 at 18:18)</a>:</h4>
<p>which lifetime issues are you referring to, <span class="user-mention" data-user-id="131694">@scalexm</span> ?</p>



<a name="152564700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564700">(Dec 26 2018 at 18:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I mean the reasons why I deactivated region constraints in rustc’s chalk code :)</p>



<a name="152564701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564701">(Dec 26 2018 at 18:19)</a>:</h4>
<p>Which you asked about on the PR</p>



<a name="152564780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564780">(Dec 26 2018 at 18:20)</a>:</h4>
<p>ah :)</p>



<a name="152564781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564781">(Dec 26 2018 at 18:20)</a>:</h4>
<p>I'm skimming the PR comments now to refresh my memory</p>



<a name="152564826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564826">(Dec 26 2018 at 18:21)</a>:</h4>
<p>I guess you mean this:</p>
<div class="codehilite"><pre><span></span><span class="w"> </span><span class="c1">// FIXME: restore this later once we get better at handling regions</span>
</pre></div>


<p>=)</p>



<a name="152564873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564873">(Dec 26 2018 at 18:22)</a>:</h4>
<p>you mentioned there were some earlier comments in this topic</p>



<a name="152564881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564881">(Dec 26 2018 at 18:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes</p>



<a name="152564886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152564886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152564886">(Dec 26 2018 at 18:22)</a>:</h4>
<p>I’ll be at home in 5 minutes</p>



<a name="152565051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565051">(Dec 26 2018 at 18:26)</a>:</h4>
<p>ok</p>



<a name="152565323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565323">(Dec 26 2018 at 18:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ok so I remember there were two problems</p>



<a name="152565365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565365">(Dec 26 2018 at 18:30)</a>:</h4>
<p>the first one occurs when unification pushes lifetime constraints</p>



<a name="152565400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565400">(Dec 26 2018 at 18:31)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Ok I'm basically hitting this bug where two answers to one goal have identical substitutions but different lifetime constraints, but actually these lifetime constraints should be identical, it's just the way they are treated in unification that triggers that</p>
</blockquote>



<a name="152565405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565405">(Dec 26 2018 at 18:31)</a>:</h4>
<blockquote>
<p>so in <code>nll_relate</code> when we equate two regions e.g. <code>'?0</code> and <code>'?1</code> we just push two region constraints <code>'?0:  '?1</code> and <code>'?1: '?0</code></p>
</blockquote>



<a name="152565409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565409">(Dec 26 2018 at 18:31)</a>:</h4>
<blockquote>
<p>but in my case, I have two different ways to prove a goal, say <code>Implemented(T: Sized)</code></p>
</blockquote>



<a name="152565411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565411">(Dec 26 2018 at 18:31)</a>:</h4>
<blockquote>
<p>I have in my environment: <code>FromEnv(T: Sized)</code>, <code>FromEnv(&amp;Option&lt;T&gt;)</code></p>
</blockquote>



<a name="152565416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565416">(Dec 26 2018 at 18:31)</a>:</h4>
<blockquote>
<p>both imply <code>Implemented(T: Sized)</code></p>
</blockquote>



<a name="152565425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565425">(Dec 26 2018 at 18:32)</a>:</h4>
<blockquote>
<p>however when using <code>FromEnv(&amp;Option&lt;T&gt;)</code>, we will basically push two useless region constraints as described above</p>
</blockquote>



<a name="152565466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565466">(Dec 26 2018 at 18:32)</a>:</h4>
<blockquote>
<p>and in turn the solver believes that there are two different answers</p>
</blockquote>



<a name="152565469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565469">(Dec 26 2018 at 18:32)</a>:</h4>
<p>(this one problem was the one I evoked earlier in this channel)</p>



<a name="152565802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565802">(Dec 26 2018 at 18:41)</a>:</h4>
<p>the <code>?0</code> and <code>?1</code> in this case are variables created as part of unifying with <code>&amp;Option&lt;T&gt;</code>, I guess?</p>



<a name="152565807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565807">(Dec 26 2018 at 18:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> right</p>



<a name="152565811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565811">(Dec 26 2018 at 18:41)</a>:</h4>
<p>in chalk proper, we do a bit more equality unification on regions, which might help address some cases like this, but doesn't seem like a <em>general</em> solution. I was pondering this plus the <code>?T: Sized</code> question a bit</p>



<a name="152565852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565852">(Dec 26 2018 at 18:42)</a>:</h4>
<p>in particular I was thinking a bit about the "deferral" mechanism that SLG offers for handling negative cycles</p>



<a name="152565860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565860">(Dec 26 2018 at 18:42)</a>:</h4>
<p>anyway, that's only semirelated</p>



<a name="152565861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565861">(Dec 26 2018 at 18:42)</a>:</h4>
<p>so one thing that I could imagine</p>



<a name="152565867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565867">(Dec 26 2018 at 18:42)</a>:</h4>
<p>is introducing a some kind of "or" constraints, so that we can union together two answers with distinct regions</p>



<a name="152565870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565870">(Dec 26 2018 at 18:42)</a>:</h4>
<p>but it's probably a good idea to push first on figuring out when constraints don't matter or are equivalent</p>



<a name="152565873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565873">(Dec 26 2018 at 18:42)</a>:</h4>
<p>just because it'll be more efficient etc</p>



<a name="152565882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565882">(Dec 26 2018 at 18:43)</a>:</h4>
<p>e.g., in chalk, if we see <code>?0 = ?1</code>, we actually go ahead and unify those variables, which we don't do in rustc</p>



<a name="152565886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565886">(Dec 26 2018 at 18:43)</a>:</h4>
<p>so in this case the constraints in question would I think just not exist</p>



<a name="152565936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565936">(Dec 26 2018 at 18:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> when you say "in chalk", you mean in the rustc's unification code used with chalk-engine?</p>



<a name="152565987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152565987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152565987">(Dec 26 2018 at 18:45)</a>:</h4>
<p>no, I mean in chalk's unification code</p>



<a name="152566036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566036">(Dec 26 2018 at 18:46)</a>:</h4>
<p>ah sorry</p>



<a name="152566044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566044">(Dec 26 2018 at 18:46)</a>:</h4>
<p>I misread your sentence, I thought you were proposing a solution</p>



<a name="152566048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566048">(Dec 26 2018 at 18:47)</a>:</h4>
<p>well, I sort of am</p>



<a name="152566051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566051">(Dec 26 2018 at 18:47)</a>:</h4>
<p>yes that's what we do in chalk indeed</p>



<a name="152566058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566058">(Dec 26 2018 at 18:47)</a>:</h4>
<p>that is, I'm saying, if we adjusted rustc to behave in this way, it would help with this <em>specific</em> example I think</p>



<a name="152566062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566062">(Dec 26 2018 at 18:47)</a>:</h4>
<p>yes right</p>



<a name="152566067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566067">(Dec 26 2018 at 18:47)</a>:</h4>
<p>I'm going to have to go soon, but I have a question -- do you believe the PR is "ready to land" as is?</p>



<a name="152566071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566071">(Dec 26 2018 at 18:47)</a>:</h4>
<p>(I don't see why not, but maybe i'm forgetting something)</p>



<a name="152566073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566073">(Dec 26 2018 at 18:47)</a>:</h4>
<p>there was some sort of implicit question in my quotations which is "why are we not doing that in rustc" :)</p>



<a name="152566126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566126">(Dec 26 2018 at 18:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I think lifetime constraints can be left as a follow-up for now indeed</p>



<a name="152566130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566130">(Dec 26 2018 at 18:48)</a>:</h4>
<p>about <code>?T: Sized</code> I was actually thinking that, since we do multiple passes in <code>select_where_possible</code> until we cannot make anymore progress, we could maybe just have <code>?T: Sized :- CannotProve</code></p>



<a name="152566146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566146">(Dec 26 2018 at 18:49)</a>:</h4>
<p>well</p>



<a name="152566149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566149">(Dec 26 2018 at 18:49)</a>:</h4>
<p>so this would trigger an ambiguity immediately, but hopefully the next pass with resolved type variables would succeed</p>



<a name="152566152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566152">(Dec 26 2018 at 18:49)</a>:</h4>
<p>I don't think this will actually work <em>quite</em> like that</p>



<a name="152566156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566156">(Dec 26 2018 at 18:49)</a>:</h4>
<p>but one simple thing we could do</p>



<a name="152566159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566159">(Dec 26 2018 at 18:49)</a>:</h4>
<p>is provide some way for the engine to help guide which subgoal is selected first</p>



<a name="152566160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566160">(Dec 26 2018 at 18:49)</a>:</h4>
<p>actually we can do this via sorting now I Think</p>



<a name="152566210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566210">(Dec 26 2018 at 18:50)</a>:</h4>
<p>if we just defer <code>?T: Sized</code> goals so they are selected last</p>



<a name="152566218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566218">(Dec 26 2018 at 18:50)</a>:</h4>
<p>and perhaps add a <code>CannotProve</code> rule for the case where <code>?T</code> is unconstrained</p>



<a name="152566220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566220">(Dec 26 2018 at 18:50)</a>:</h4>
<p>I think that would more or less be fine</p>



<a name="152566225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566225">(Dec 26 2018 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes, and then we should change rustc's code to aggregate all obligations into a big <code>And</code> goal I guess</p>



<a name="152566233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566233">(Dec 26 2018 at 18:50)</a>:</h4>
<p>which I'm not doing right now</p>



<a name="152566234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566234">(Dec 26 2018 at 18:50)</a>:</h4>
<p>I think if we <em>just</em> make it return <code>CannotProve</code>, that will be reported as a sol'n effectively</p>



<a name="152566246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566246">(Dec 26 2018 at 18:51)</a>:</h4>
<p>I was considering though revisiting that mechanism</p>



<a name="152566248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566248">(Dec 26 2018 at 18:51)</a>:</h4>
<p>this is what I meant earlier when I said something about deferred goals</p>



<a name="152566250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566250">(Dec 26 2018 at 18:51)</a>:</h4>
<p>I also may just not be remembering properly</p>



<a name="152566252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566252">(Dec 26 2018 at 18:51)</a>:</h4>
<p>but I think that <code>CannotProve</code> will wind up adding a "deferred constraint" that can never be discharged..?</p>



<a name="152566255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566255">(Dec 26 2018 at 18:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <code>CannotProve</code> in chalk-engine automatically sets <code>ambiguous</code> flag on the solution</p>



<a name="152566257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566257">(Dec 26 2018 at 18:51)</a>:</h4>
<p>yes that's right</p>



<a name="152566309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566309">(Dec 26 2018 at 18:52)</a>:</h4>
<p>right now we don't have a notion of a delayed literal that is a <em>positive</em> goal</p>



<a name="152566312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566312">(Dec 26 2018 at 18:52)</a>:</h4>
<p>but it could be added</p>



<a name="152566317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566317">(Dec 26 2018 at 18:52)</a>:</h4>
<p>the idea would be that when you reach a sol'n with no further literals remaining</p>



<a name="152566319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566319">(Dec 26 2018 at 18:52)</a>:</h4>
<p>you remove the delayed ones</p>



<a name="152566322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566322">(Dec 26 2018 at 18:52)</a>:</h4>
<p>this is however more-or-less equivalent to altering the selection order I think</p>



<a name="152566323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566323">(Dec 26 2018 at 18:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I see</p>



<a name="152566326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566326">(Dec 26 2018 at 18:53)</a>:</h4>
<p>yes ok</p>



<a name="152566331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566331">(Dec 26 2018 at 18:53)</a>:</h4>
<p>and so the latter might be a cleaner feeling way to do it</p>



<a name="152566334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566334">(Dec 26 2018 at 18:53)</a>:</h4>
<p>though maybe not</p>



<a name="152566336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566336">(Dec 26 2018 at 18:53)</a>:</h4>
<p>I think all of these incidentally (technically?) invalidate the "completeness proofs" of the SLG solver, which assume a "fixed selection order", but I doubt it matters</p>



<a name="152566338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566338">(Dec 26 2018 at 18:53)</a>:</h4>
<p>(at least it's not obvious to me how that would actually lead to incompleteness)</p>



<a name="152566378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566378">(Dec 26 2018 at 18:54)</a>:</h4>
<p>I'm also not sure really it's not like I reviewed said proofs in detail, I just remember some notes about it in some papers</p>



<a name="152566382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566382">(Dec 26 2018 at 18:54)</a>:</h4>
<p>that is, I don't really know what "fixed" means</p>



<a name="152566408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566408">(Dec 26 2018 at 18:55)</a>:</h4>
<p>anyway I think that choosing a going selection order is going to be somewhat <em>crucial</em> in controlling explosive runtimes in certain cases</p>



<a name="152566420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566420">(Dec 26 2018 at 18:55)</a>:</h4>
<p>e.g., if you have unconstrained type variables, you want to look for trait references that are not going to wind up generating tons and tons of solution for them</p>



<a name="152566422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566422">(Dec 26 2018 at 18:55)</a>:</h4>
<p>right</p>



<a name="152566423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566423">(Dec 26 2018 at 18:56)</a>:</h4>
<p><code>?T: Sized</code> being a good example of a very bad choice :)</p>



<a name="152566472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566472">(Dec 26 2018 at 18:56)</a>:</h4>
<p>I imagine in practice we might have some simple heuristics that look at the impls for other traits and try to judge similar qualities</p>



<a name="152566477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566477">(Dec 26 2018 at 18:56)</a>:</h4>
<p>in my ideal world those heuristics live in <em>chalk</em> and are quite general</p>



<a name="152566480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566480">(Dec 26 2018 at 18:56)</a>:</h4>
<p>but I haven't given it much thought</p>



<a name="152566485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566485">(Dec 26 2018 at 18:56)</a>:</h4>
<p>there <em>has</em> to be prior work on this</p>



<a name="152566487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566487">(Dec 26 2018 at 18:56)</a>:</h4>
<p>yeah probably</p>



<a name="152566497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566497">(Dec 26 2018 at 18:57)</a>:</h4>
<p>I talked some to Will Byrd (of Minikanren fame) about this</p>



<a name="152566504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566504">(Dec 26 2018 at 18:57)</a>:</h4>
<p>the tl;dr was we'd have to gather more data about what happens <em>in Rust</em> before we could figure out what would be best</p>



<a name="152566507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566507">(Dec 26 2018 at 18:57)</a>:</h4>
<p>which seems sort of obvious</p>



<a name="152566512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566512">(Dec 26 2018 at 18:57)</a>:</h4>
<p><em>anyway</em>, I'll go ahead and r+ your PR</p>



<a name="152566519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566519">(Dec 26 2018 at 18:57)</a>:</h4>
<p>I'm going to disappear till tomorrow soon, still on vacation</p>



<a name="152566522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566522">(Dec 26 2018 at 18:57)</a>:</h4>
<p>I don't think we are in a hurry merging this PR, + it does not seem to be affected often by merge conflicts</p>



<a name="152566565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566565">(Dec 26 2018 at 18:58)</a>:</h4>
<p>we could wait a bit until we have more time experimenting with things</p>



<a name="152566568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566568">(Dec 26 2018 at 18:58)</a>:</h4>
<p>ok; regardless, it feels like it'd be great to get it landed as a foundation to build upon</p>



<a name="152566572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566572">(Dec 26 2018 at 18:58)</a>:</h4>
<p>I'm fine with both</p>



<a name="152566574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566574">(Dec 26 2018 at 18:58)</a>:</h4>
<p>but we do have to figure out how to track all the FIXMEs and things most effectively</p>



<a name="152566582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566582">(Dec 26 2018 at 18:58)</a>:</h4>
<p>I am hoping to that we can create a kind of "roadmap" for further work</p>



<a name="152566586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566586">(Dec 26 2018 at 18:58)</a>:</h4>
<p>yes</p>



<a name="152566594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/152566594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#152566594">(Dec 26 2018 at 18:58)</a>:</h4>
<p>I might put some time into that over next few days, trying to figure out what that even means :)</p>



<a name="154184151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154184151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154184151">(Jan 02 2019 at 16:22)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> so is work to integrate lifetime bounds into Chalk on the way?</p>



<a name="154184196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154184196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154184196">(Jan 02 2019 at 16:23)</a>:</h4>
<p><span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> not yet</p>



<a name="154184212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154184212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154184212">(Jan 02 2019 at 16:23)</a>:</h4>
<p>We need to open issues first, and to have some kind of roadmap</p>



<a name="154184902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154184902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154184902">(Jan 02 2019 at 16:33)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span> ah okay. waiting for Niko on that, or just plodding along, and haven't got to it yet?</p>



<a name="154184964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154184964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154184964">(Jan 02 2019 at 16:34)</a>:</h4>
<p>Both actually :)</p>



<a name="154185822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/154185822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#154185822">(Jan 02 2019 at 16:46)</a>:</h4>
<p>okay ;-)</p>



<a name="161486483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486483">(Mar 22 2019 at 21:40)</a>:</h4>
<p><span class="user-mention" data-user-id="131694">@scalexm</span>, long ago <a href="#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148743502" title="#narrow/stream/144729-wg-traits/topic/chalk-integration/near/148743502">you wrote</a>:</p>
<blockquote>
<ul>
<li>lazy normalization seems to work well in an unnormalized context, but since there are calls to <code>traits::normalize</code> a bit everywhere I cannot even test it with concrete types since the associated types values are resolved even before using the chalk engine :p there seems to be a lot of different ways to normalize associated types currently so I'm not sure which ones I should try to e.g. deactivate in the presence of <code>-Z chalk</code></li>
</ul>
</blockquote>
<p>I saw that there is (in the <code>TraitEngine</code> trait) now a <code>normalize</code> method -- did you do something to resolve this? I imagine there still exist a lot of explicit normalization steps</p>



<a name="161486493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486493">(Mar 22 2019 at 21:40)</a>:</h4>
<p>I'm kind of trying to pull together a comprehensive look at next steps</p>



<a name="161486531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486531">(Mar 22 2019 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I did not try to remove any of the explicit normalization steps</p>



<a name="161486538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486538">(Mar 22 2019 at 21:41)</a>:</h4>
<p>OK.</p>



<a name="161486587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486587">(Mar 22 2019 at 21:42)</a>:</h4>
<p>Well, I gotta run, but I have some hand-written notes, and I'm going to try to pull them together</p>



<a name="161486591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486591">(Mar 22 2019 at 21:42)</a>:</h4>
<p>The <code>normalize</code> method was ore-existing to my set of PRs, introduced in <span class="user-mention" data-user-id="116773">@csmoe</span>’s PR</p>



<a name="161486596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486596">(Mar 22 2019 at 21:42)</a>:</h4>
<p>ok</p>



<a name="161486599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486599">(Mar 22 2019 at 21:42)</a>:</h4>
<p>I figured as much</p>



<a name="161486600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486600">(Mar 22 2019 at 21:42)</a>:</h4>
<p>but just wanted to confirm</p>



<a name="161486608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486608">(Mar 22 2019 at 21:42)</a>:</h4>
<p>Was it clear to you what the problem was with lifetimes in unification?</p>



<a name="161486610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486610">(Mar 22 2019 at 21:42)</a>:</h4>
<p>yep, I remember now</p>



<a name="161486615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486615">(Mar 22 2019 at 21:42)</a>:</h4>
<p>Ok good</p>



<a name="161486630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486630">(Mar 22 2019 at 21:43)</a>:</h4>
<p>I'm going to think about it over the weekend and on Monday and hopefully have some proposals :)</p>



<a name="161486637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486637">(Mar 22 2019 at 21:43)</a>:</h4>
<p>I mean the options are basically the same things we wrote before I thnk</p>



<a name="161486641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/chalk-integration/near/161486641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/chalk-integration.html#161486641">(Mar 22 2019 at 21:43)</a>:</h4>
<p>at least in short term</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>